<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>My JSP 'register.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	<SCRIPT type="text/javascript">
	
	function validate(){
		var username = document.getElementById("usernameId").value;
		if(username.length == 0){
			alert("用户名必填！");
			return false;
		}
		if(username.length <6 || username.length > 10 ){
			alert("用户名长度必须在6到10之间！");
			return false;
		}
		return true;
	}
	
	</SCRIPT>

	</head>

	<body>

		<s:token></s:token>
	
		<center>
			<s:text name="adduser"></s:text>
		</center>
		
		<table align="center">
			<tr>
				<td style="color:red">
					<s:fielderror></s:fielderror>
					<hr>
					<s:actionerror/>
				</td>
			</tr>
		</table>

		<table align="center">
			<s:form action="register">
				<s:textfield name="username" label="username" id="usernameId"></s:textfield>
				<s:password name="password" label="password"></s:password>
				<s:password name="repassword" label="repassword"></s:password>
				<s:textfield name="age" label="Age"></s:textfield>
				<s:textfield name="birthday" label="birth"></s:textfield>
				<s:textfield name="graduation" label="graduation"></s:textfield>

				<s:submit></s:submit>
			</s:form>
		</table>

	</body>
</html>
